package cn.iocoder.yudao.module.yyzx.dal.mysql.menu_food;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.yyzx.dal.dataobject.menu_food.Menu_foodDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.yyzx.controller.admin.menu_food.vo.*;

/**
 * 食物 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface Menu_foodMapper extends BaseMapperX<Menu_foodDO> {

    default PageResult<Menu_foodDO> selectPage(Menu_foodPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<Menu_foodDO>()
                .likeIfPresent(Menu_foodDO::getMenuName, reqVO.getMenuName())
                .eqIfPresent(Menu_foodDO::getNub, reqVO.getNub())
                .eqIfPresent(Menu_foodDO::getRemarks, reqVO.getRemarks())
                .eqIfPresent(Menu_foodDO::getMenuType, reqVO.getMenuType())
                .betweenIfPresent(Menu_foodDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(Menu_foodDO::getId));
    }

}